﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ChromaCode.Models;
using System.Windows.Documents;

namespace ChromaCode.Services
{
    /// <summary>
    /// Base class for all rule services
    /// </summary>
    internal class RuleBaseService<_RuleType> where _RuleType : new()
    {
        #region Public

        /// <summary>
        /// Initialise the base rules service
        /// </summary>
        public RuleBaseService()
        {
            HighlightElements = new List<HighlightElement>();
        }

        /// <summary>
        /// A list of highlight elements that this service has generated
        /// </summary>
        public List<HighlightElement> HighlightElements
        {
            get;
            set;
        }

        #endregion Public

        #region Protected

        /// <summary>
        /// The list of rules that we are using to do the highlighting
        /// </summary>
        protected List<_RuleType> Rules
        {
            get;
            set;
        }

        /// <summary>
        /// The paragraph that we are starting the highlight process at
        /// </summary>
        protected Paragraph StartParagraph
        {
            get;
            set;
        }

        /// <summary>
        /// Whether or not we are highlighing the whole document from the start paragraph onwards
        /// </summary>
        protected bool HighlightWholeDoc
        {
            get;
            set;
        }

        #endregion #Protected
    }
}
